/**********************************************************************************************/
// dgt_Algorithm.h
//
// Common Lib for Digital Studio
// Block for representation algorithm
// Main class, that represent converter of bool functions
//
// Copyright Diamant Group 2007
/**********************************************************************************************/
#ifndef _DGT_Algorithm_H_
#define _DGT_Algorithm_H_

#include "dgtKernel.h"
#include "dgt_AlgAction.h"
#include "dgt_AlgConditions.h"
#include "dgt_AlgLogic.h"
#include "dgt_AlgVar.h"
#include "dgt_SmartMacros.h"

SMART_CLASS( dgt_Algorithm );

/**********************************************************************************************/
// Algorithm representation
//
class dgt_Algorithm
{
	public://///////////////////////////////////////////////////////////////////////////////////
		
		/**
		* @brief Ctor as default
		*/
		dgt_Algorithm( void )	{};

		/**
		* @brief Ctor
		* @param inName			Name of algorithm
		* @param inActions		Array of actions
		* @param inConditions	Array of conditions
		* @param inLogics		Array of logic
		* @param inInputVars	Array of input vars
		* @param inInternalVars	Array of internal vars
		* @param inOutputVars	Array of output vars
		*/
		dgt_Algorithm(	wxString			inName,
						dgt_AlgActArray		inActions,
						dgt_AlgCondArray	inConditions,
						dgt_AlgLogArray		inLogics,
						dgt_AlgVarArray		inInputVars,
						dgt_AlgVarArray		inInternalVars,
						dgt_AlgVarArray		inOutputVars );

		/**
		* @brief Dtor as default
		*/
		~dgt_Algorithm( void ) {};

	public://///////////////////////////////////////////////////////////////////////////////////

		/**
		* @brief Function for getting name of algotithm
		* @return name of algotithm
		*/
		wxString				get_Name( void );

		/**
		* @brief Function for setting name of algotithm
		* @param inName New name of algotithm
		*/
		void					set_Name( wxString inName );

		/**
		* @brief Function for getting array of actions
		* @return Array of actions
		*/
		dgt_AlgActArray			get_Actions( void );

		/**
		* @brief Function for setting array of actions
		* @param inActions New array of actions
		*/
		void					set_Actions( dgt_AlgActArray inActions );

		/**
		* @brief Function for getting count of the items in the array of actions
		* @return Count of the items in the array of actions
		*/
		unsigned				get_ActionsCount( void );

		/**
		* @brief Function for getting array of conditions
		* @return Array of conditions
		*/
		dgt_AlgCondArray		get_Conditions( void );

		/**
		* @brief Function for setting array of conditions
		* @param inConditions New array of conditions
		*/
		void					set_Conditions( dgt_AlgCondArray inConditions );

		/**
		* @brief Function for getting count of the items in the array of conditions
		* @return Count of the items in the array of conditions
		*/
		unsigned				get_ConditionsCount( void );

		/**
		* @brief Function for getting array of logic
		* @return Array of logic
		*/
		dgt_AlgLogArray			get_Logics( void );

		/**
		* @brief Function for setting array of logic
		* @param inLogics New array of logic
		*/
		void					set_Logics( dgt_AlgLogArray inLogics );

		/**
		* @brief Function for getting count of the items in the array of logic
		* @return Count of the items in the array of logic
		*/
		unsigned				get_LogicsCount( void );

		/**
		* @brief Function for getting array of input vars
		* @return Array of input vars
		*/
		dgt_AlgVarArray			get_InputVars( void );

		/**
		* @brief Function for setting array of input vars
		* @param inInputVars New array of input vars
		*/
		void					set_InputVars( dgt_AlgVarArray inInputVars );

		/**
		* @brief Function for getting count of the items in the array of input vars
		* @return Count of the items in the array of input vars
		*/
		unsigned				get_InputVarsCount( void );

		/**
		* @brief Function for getting array of internal vars
		* @return Array of internal vars
		*/
		dgt_AlgVarArray			get_InternalVars( void );

		/**
		* @brief Function for setting array of internal vars
		* @param inInternalVars New array of internal vars
		*/
		void					set_InternalVars( dgt_AlgVarArray inInternalVars );

		/**
		* @brief Function for getting count of the items in the array of internal vars
		* @return Count of the items in the array of internal vars
		*/
		unsigned				get_InternalVarsCount( void );

		/**
		* @brief Function for getting array of output vars
		* @return Array of output vars
		*/
		dgt_AlgVarArray			get_OutputVars( void );

		/**
		* @brief Function for setting array of output vars
		* @param inOutputVars New array of output vars
		*/
		void					set_OutputVars( dgt_AlgVarArray inOutputVars );

		/**
		* @brief Function for getting count of the items in the array of output vars
		* @return Count of the items in the array of output vars
		*/
		unsigned				get_OutputVarsCount( void );

	private:////////////////////////////////////////////////////////////////////////////////////

		wxString				m_Name;						/*!< name of algotithm */

		dgt_AlgActArray			m_Actions;					/*!< Array of actions */

		dgt_AlgCondArray		m_Conditions;				/*!< Array of conditions */

		dgt_AlgLogArray			m_Logics;					/*!< Array of logic */

		dgt_AlgVarArray			m_InputVars;				/*!< Array of input vars */

		dgt_AlgVarArray			m_InternalVars;				/*!< Array of internal vars */

		dgt_AlgVarArray			m_OutputVars;				/*!< Array of output vars */
};


#endif // _DGT_Algorithm_H_
